<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="a_vuejs/vue.global.js"></script>
</head>
<body>

<div id="app">

</div>

</body>

<script>

    Vue.createApp({
        data(){
            return{
                msg:'消息....'
            }
        },
        beforeCreate() {
            console.log("beforeCreate")
            console.log(this) //这时候已经创建好
            console.log(this.msg) //undefined:beforeCreate 属性msg还未创建
            //beforeCreate:还未创建/初始化好m1方法
            console.log(this.m1) //undefined
        },
        created() {
            console.log("created")
            console.log(this)
            console.log(this.msg) //能正常输出
            console.log(this.m1) //能正常输出
        },
        beforeMount() {console.log("beforeMount")},
        mounted() {console.log("mounted")},
        beforeUpdate() {console.log("beforeUpdate")},
        updated() {console.log("updated")},
        beforeUnmount() {console.log("beforeUnmount")},
        unmounted() {console.log("unmounted")},
        methods: {
            m1(){}
        }


    }).mount("#app")
</script>

</html>